<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<? foreach ($urlset as $url): ?>
<url>
    <loc><?= $url['loc'] ?></loc>
    <lastmod><?= $url['lastmod'] ?></lastmod>
    <changefreq><?= $url['freq'] ?></changefreq>
    <priority><?= $url['priority'] ?></priority>
</url>
<? endforeach ?>
</urlset>